<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改社保缴费管理')" />
            <th:block th:include="include :: datetimepicker-css" />
            <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<style>
    .jltable{
        margin: auto;
    }
    .jltable th,td{
        min-height: 40px;
        min-width: 50px;
        border: 1px solid #eee;
        padding: 10px;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-sbjfgl-edit" th:object="${lwpqSbjfgl}">
        <input name="id" th:field="*{id}" type="hidden">
        <h4 class="form-header h4">社保管理</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">名称</label></td>
                <td><input th:field="*{name}" name="name" class="form-control" type="text"></td>
                <td></td>
                <td><label class="control-label is-required">适用对象</label></td>
                <td><input th:field="*{sydx}" name="sydx" class="form-control" type="text" required></td>
            </tr>
            <tr>
                <td><label class="control-label is-required">开始月份</label></td>
                <td>
                    <div class="input-group date">
                        <input th:value="${#dates.format(lwpqSbjfgl.ksyf, 'yyyy-MM')}" name="ksyf" class="form-control" placeholder="yyyy-MM" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </td>
                <td></td>
                <td><label class="control-label is-required">截至月份</label></td>
                <td>
                    <div class="input-group date">
                        <input th:value="${#dates.format(lwpqSbjfgl.jzyf, 'yyyy-MM')}"  name="jzyf" class="form-control" placeholder="yyyy-MM" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </td>
            </tr>

            <tr>
                <td><label class="control-label">说明</label></td>
                <td colspan="4"><textarea th:field="*{sm}"  name="sm" class="form-control"></textarea></td>
            </tr>
            <tr>
                <td><label class="control-label">相关文件</label></td>
                <td colspan="4">
                    <input type="hidden" name="xgwj">
                    <div class="file-loading">
                        <input class="form-control file-upload" id="xgwj" name="file" type="file">
                    </div>
                </td>
            </tr>
            </tbody>
        </table>

        <h4 class="form-header h4" style="margin-top: 20px">养老保险</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">养老保险基数</label></td>
                <td><input th:field="*{ylbxjs}"  name="ylbxjs" class="form-control" type="text"></td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td><label class="control-label">养老个人比例（%）</label></td>
                <td><input th:field="*{ylgrbl}"  name="ylgrbl" class="form-control" type="text"></td>
                <td><label class="control-label">养老单位比例（%）</label></td>
                <td><input th:field="*{yldwbl}" name="yldwbl" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>

        <h4 class="form-header h4" style="margin-top: 20px">失业保险</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">失业保险基数</label></td>
                <td><input  th:field="*{sybxjs}"  name="sybxjs" class="form-control" type="text"></td><td></td><td></td>
            </tr>
            <tr>
                <td><label class="control-label">失业个人比例（%）</label></td>
                <td><input th:field="*{sygrbl}"  name="sygrbl" class="form-control" type="text"></td>
                <td><label class="control-label">失业单位比例（%）</label></td>
                <td><input th:field="*{sydwbl}" name="sydwbl" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>
        <h4 class="form-header h4" style="margin-top: 20px">工伤保险</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">工伤保险基数</label></td>
                <td><input th:field="*{gsbxjs}" name="gsbxjs" class="form-control" type="text"></td><td></td><td></td>
            </tr>
            <tr>
                <td><label class="control-label">工伤个人比例（%）</label></td>
                <td><input th:field="*{gsgrbl}" name="gsgrbl" class="form-control" type="text"></td>
                <td><label class="control-label">工伤单位比例（%）</label></td>
                <td><input th:field="*{gsdwbl}" name="gsdwbl" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>
        <h4 class="form-header h4" style="margin-top: 20px">医疗保险</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">医疗保险基数</label></td>
                <td><input  th:field="*{ylbxjsYi}" name="ylbxjsYi" class="form-control" type="text"></td><td></td><td></td>
            </tr>
            <tr>
                <td><label class="control-label">医疗个人比例（%）</label></td>
                <td><input  th:field="*{ylgrblYi}" name="ylgrblYi" class="form-control" type="text"></td>
                <td><label class="control-label">医疗单位比例（%）</label></td>
                <td><input th:field="*{yldwblYi}" name="yldwblYi" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>
        <h4 class="form-header h4" style="margin-top: 20px">生育保险</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">生育保险基数</label></td>
                <td><input th:field="*{sybxjsSheng}" name="sybxjsSheng" class="form-control" type="text"></td><td></td><td></td>
            </tr>
            <tr>
                <td><label class="control-label">生育个人比例（%）</label></td>
                <td><input th:field="*{sygrblSheng}" name="sygrblSheng" class="form-control" type="text"></td>
                <td><label class="control-label">生育单位比例（%）</label></td>
                <td><input th:field="*{sydwblSheng}" name="sydwblSheng" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>
        <h4 class="form-header h4" style="margin-top: 20px">保险合计</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">大病个人（元）</label></td>
                <td><input th:field="*{dbgr}" name="dbgr" class="form-control" type="text"></td><td></td><td></td>
            </tr>
            <tr>
                <td><label class="control-label">个人社保缴费（元）</label></td>
                <td><input th:field="*{grsbjf}"  name="grsbjf" class="form-control" type="text"></td>
                <td><label class="control-label">单位社保缴费（元）</label></td>
                <td><input th:field="*{dwsbjf}"  name="dwsbjf" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>
        <h4 class="form-header h4" style="margin-top: 20px">公积金</h4>
        <table class="jltable">
            <tbody>
            <tr>
                <td><label class="control-label">公积金基数</label></td>
                <td><input th:field="*{gjjjs}" name="gjjjs" class="form-control" type="text"></td>
                <td></td><td></td>
            </tr>
            <tr>
                <td><label class="control-label">公积金个人比例（%）</label></td>
                <td><input th:field="*{gjjgrbl}" name="gjjgrbl" class="form-control" type="text"></td>
                <td><label class="control-label">公积金单位比例（%）</label></td>
                <td><input th:field="*{gjjdwbl}" name="gjjdwbl" class="form-control" type="text"></td>
            </tr>

            <tr>
                <td><label class="control-label">公积金个人（元）</label></td>
                <td><input th:field="*{gjjgr}"  name="gjjgr" class="form-control" type="text"></td>
                <td><label class="control-label">公积金单位（元）</label></td>
                <td><input th:field="*{gjjdw}" name="gjjdw" class="form-control" type="text"></td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<th:block th:include="include :: footer" />
        <th:block th:include="include :: datetimepicker-js" />
        <th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
    var prefix = ctx + "lwpq/sbjfgl";
    $("#form-sbjfgl-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-sbjfgl-edit').serialize());
        }
    }

            $("input[name='ksyf']").datetimepicker({
                format: "yyyy-mm",
                minView: "month",
                autoclose: true
            });

            $("input[name='jzyf']").datetimepicker({
                format: "yyyy-mm",
                minView: "month",
                autoclose: true
            });

            $(".file-upload").each(function (i) {
                var val = $("input[name='" + this.id + "']").val()
                $(this).fileinput({
                    'uploadUrl': ctx + 'common/upload',
                    initialPreviewAsData: true,
                    initialPreview: [val],
                    maxFileCount: 1,
                    autoReplace: true
                }).on('fileuploaded', function (event, data, previewId, index) {
                    $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
                }).on('fileremoved', function (event, id, index) {
                    $("input[name='" + event.currentTarget.id + "']").val('')
                })
                $(this).fileinput('_initFileActions');
            });
</script>
</body>
</html>